<%@ Control Language="C#" Inherits="BSU.CSCE.Web.Views.BaseViewUserControl<PublicationFormViewModel>" %>

<fieldset>
    <legend></legend>
    <p>
        <label for="<%= Reflector.GetPropertyName<Publication>(x => x.Status) %>">
            <%= (string)GetLocalResourceObject("Status") %>:</label>
        <%=Html.DropDownList(Reflector.GetPropertyName<Publication>(x => x.Status), Model.PublicationStatuses)%>
        <%= Html.ValidationMessage(Reflector.GetPropertyName<Publication>(x => x.Status)) %>
    </p>
    <p>
        <label for="<%= Reflector.GetPropertyName<Publication>(x => x.Type) %>">
            <%= (string)GetLocalResourceObject("Type") %>:</label>
        <%=Html.DropDownList(Reflector.GetPropertyName<Publication>(x => x.Type), Model.PublicationTypes)%>
        <%= Html.ValidationMessage(Reflector.GetPropertyName<Publication>(x => x.Type)) %>
    </p>
    <p>
        <label for="<%= Reflector.GetPropertyName<Publication>(x => x.Title) %>">
            <%= (string)GetLocalResourceObject("Title") %>:</label>
        <%= Html.TextBox(Reflector.GetPropertyName<Publication>(x => x.Title), Model.Publication.Title)%>
        <%= Html.ValidationMessage(Reflector.GetPropertyName<Publication>(x => x.Title))%>
    </p>
    <p>
        <label for="<%= Reflector.GetPropertyName<Publication>(x => x.ShortDescription) %>">
            <%= (string)GetLocalResourceObject("ShortDescription") %>:</label>
        <%= Html.TextArea(Reflector.GetPropertyName<Publication>(x => x.ShortDescription), Model.Publication.ShortDescription)%>
        <%= Html.ValidationMessage(Reflector.GetPropertyName<Publication>(x => x.ShortDescription))%>
    </p>
    <p>
        <label for="<%= Reflector.GetPropertyName<Publication>(x => x.Description) %>">
            <%= (string)GetLocalResourceObject("Description") %>:</label>
        <%= Html.TextArea(Reflector.GetPropertyName<Publication>(x => x.Description), Model.Publication.Description)%>
        <%= Html.ValidationMessage(Reflector.GetPropertyName<Publication>(x => x.Description))%>
    </p>
    
    <p>
        <label for="<%= Reflector.GetPropertyName<Publication>(x => x.PublishingTime) %>">
            <%= (string)GetLocalResourceObject("PublishingTime")%>:</label>
        <%= Html.TextBox(Reflector.GetPropertyName<Publication>(x => x.PublishingTime), Model.Publication.PublishingTime)%>
        <%= Html.ValidationMessage(Reflector.GetPropertyName<Publication>(x => x.PublishingTime))%>
    </p>
    
    <%--<p>
        <label for="confirmPassword">
            Confirm password:</label>
        <%= Html.Password("confirmPassword") %>
        <%= Html.ValidationMessage("confirmPassword") %>
    </p>--%>
    <p>
    <input type="submit" value="<%= (string)GetGlobalResourceObject("Action", "Save") %>" />
    <%--<%if (!String.IsNullOrEmpty(PreviousPageLink))
      { %>
      <input type="button" value="<%= (string)GetGlobalResourceObject("Action", "Cancel") %>"
        onclick="document.location.href='<%=PreviousPageLink %>'; return false;" />    
    <%}
      else if (Model is EditUserFormViewModel)
      { %>
    <input type="button" value="<%= (string)GetGlobalResourceObject("Action", "Cancel") %>"
        onclick="document.location.href='<%=ResolveClientUrl("~/Users/Details/")%><%=ViewContext.RouteData.Values["id"] %>'; return false;" />
    <%}
      else
      {%>
      <input type="button" value="<%= (string)GetGlobalResourceObject("Action", "Cancel") %>"
        onclick="document.location.href='<%=ResolveClientUrl("~/Users/")%>'; return false;" />
    <%} %>--%>
</p>
</fieldset>
